package com.probox.order.api.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.probox.common.core.annotation.Excel;
import com.probox.common.core.utils.money.PriceFormatUtil;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public class ItemSettlementVo implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long itemUid;
    /**
     * 供应商ID
     */
    @Excel(name = "供应商ID")
    private Long supplierUid;
    /**
     * 订单id
     */
    @Excel(name = "订单id")
    private Long orderUid;
    /**
     * 参与活动ID
     */
    @Excel(name = "参与活动ID")
    private Long activityProUid;
    /**
     * 商品ID
     */
    @Excel(name = "商品ID")
    private Long proUid;
    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    private String proName;
    /**
     * sku属性ID
     */
    @Excel(name = "sku属性ID")
    private Long skuUid;
    /**
     * SKU的属性值
     */
    @Excel(name = "SKU的属性值")
    private String skuDesc;
    /**
     * 封面图
     */
    @Excel(name = "封面图")
    private String imgUrl;
    /**
     * 销售单价
     */
    @Excel(name = "销售单价")
    private Long price;
    /**
     * 成本价/供应商价格
     */
    @Excel(name = "成本价/供应商价格")
    private Long costPrice;
    /**
     * 展示价格
     */
    @Excel(name = "展示价格")
    private Long showPrice;
    /**
     * 数量
     */
    @Excel(name = "数量")
    private Long itemNumber;
    /**
     * 合计金额
     */
    @Excel(name = "合计金额")
    private Long itemAmount;
    /**
     * 现金支付金额
     */
    @Excel(name = "现金支付金额")
    private Long payAmount;
    /**
     * 使用优惠券的金额
     */
    @Excel(name = "使用优惠券的金额")
    private Long useCouponAmount;
    /**
     * 折扣金额
     */
    @Excel(name = "折扣金额")
    private Long discountAmount;
    /**
     * 余额支付
     */
    @Excel(name = "余额支付")
    private Long payByBalance;
    /**
     * 购物车ID
     */
    @Excel(name = "购物车ID")
    private Long cartUid;
    /**
     * 结算状态
     */
    @Excel(name = "结算状态")
    private String settlementStatus;
    /**
     * 结算时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "结算时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date settlementTime;
    /**
     * 售后状态
     */
    @Excel(name = "售后状态")
    private String saleStatus;
    /**
     * 数据状态
     */
    @Excel(name = "数据状态")
    private String dataStatus;
    /**
     * 创建人
     */
    @Excel(name = "创建人")
    private Long createUid;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 更新人
     */
    @Excel(name = "更新人")
    private Long updateUid;
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;


    /**
     * 平台ID
     */
    @Excel(name = "平台ID")
    private Long platformUid;

    /**
     * 供应商名称
     */
    @Excel(name = "供应商名称")
    private String supplierName;
    /**
     * 订单类型
     */
    @Excel(name = "订单类型")
    private String orderType;
    /**
     * 商家订单号
     */
    @Excel(name = "商家订单号")
    private String orderNo;
    /**
     * 支付订单号
     */
    @Excel(name = "支付订单号")
    private String parentOrderNo;

    /**
     * 客户ID
     */
    @Excel(name = "客户ID")
    private Long customerUid;
    /**
     * 客户名称
     */
    @Excel(name = "客户名称")
    private String customerName;
    /**
     * 手机号码
     */
    @Excel(name = "手机号码")
    private String phone;
    /**
     * 订单状态
     */
    @Excel(name = "订单状态")
    private String orderStatus;
    /**
     * 支付状态
     */
    @Excel(name = "支付状态")
    private String payStatus;
    /**
     * 支付方式
     */
    @Excel(name = "支付方式")
    private String payMethod;
    /**
     * 订单来源
     */
    @Excel(name = "订单来源")
    private String platSource;

    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    /**
     * 订单取消时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "订单取消时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date cancelTime;
    /**
     * 买家留言
     */
    @Excel(name = "买家留言")
    private String buyMes;
    /**
     * 未支付订单过期时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "未支付订单过期时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date expireDate;
    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remark;
    /**
     * ip地址
     */
    @Excel(name = "ip地址")
    private String ip;
    /**
     * 开票信息
     */
    @Excel(name = "开票信息")
    private Long invoiceUid;
    /**
     * 开票状态
     */
    @Excel(name = "开票状态")
    private String invoiceStatus;
    /**
     * 配送方式
     */
    @Excel(name = "配送方式")
    private String deliverMethod;
    /**
     * 发货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date sendTime;
    /**
     * 发货状态
     */
    @Excel(name = "发货状态")
    private String sendStatus;
    /**
     * 包裹状态
     */
    @Excel(name = "包裹状态")
    private String orderPackStatus;
    /**
     * 签收时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "签收时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date signTime;
    /**
     * 收货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "收货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date receiveTime;
    /**
     * 自动收货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "自动收货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date autoReceiveTime;
    /**
     * 评价状态
     */
    @Excel(name = "评价状态")
    private String commentStatus;
    /**
     * 评价时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "评价时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date commentTime;

    private Long [] itemIds;

    public String getItemAmountStr(){
        return PriceFormatUtil.format(itemAmount);
    }

    public String getPayAmountStr(){
        return PriceFormatUtil.format(payAmount);
    }

    public String getDiscountAmountStr(){
        return PriceFormatUtil.format(discountAmount);
    }

    public String getUseCouponAmountStr(){
        return PriceFormatUtil.format(useCouponAmount);
    }

    public String getPayByBalanceStr(){
        return PriceFormatUtil.format(payByBalance);
    }

}
